﻿using MN.Framework.Common;
using MN.Framework.Common.Security;
using MN.Framework.MetaData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MN.Framework.Common.Security
{
    [EntityHeader("نقش ها")]
    public partial class Role : BaseEntity, IRole
    {
        public override int ID { get; set; }
        public string RoleName { get; set; }
        public virtual ICollection<UsersInRole> UsersInRoles { get; set; }

        public Role()
        {
            this.UsersInRoles = new HashSet<UsersInRole>();
        }       

        public override void GetColumns(List<ColumnInfo> columns)
        {
            columns.Add(new NumericColumnInfo("ID", "شناسه", true));
            columns.Add(new TextColumnInfo("RoleName", "عنوان نقش"));
        }
    }
}
